Integrand size = 45, antiderivative size = 417 \[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=-\frac {2 B^2 d i^2 n^2 (c+d x)}{b^2 g^3 (a+b x)}-\frac {B^2 i^2 n^2 (c+d x)^2}{4 b g^3 (a+b x)^2}-\frac {2 B d i^2 n (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^2 g^3 (a+b x)}-\frac {B i^2 n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 b g^3 (a+b x)^2}-\frac {d i^2 (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{b^2 g^3 (a+b x)}-\frac {i^2 (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 b g^3 (a+b x)^2}-\frac {d^2 i^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 g^3}+\frac {2 B d^2 i^2 n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 g^3}+\frac {2 B^2 d^2 i^2 n^2 \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 g^3} \]
-2*B^2*d*i^2*n^2*(d*x+c)/b^2/g^3/(b*x+a)-1/4*B^2*i^2*n^2*(d*x+c)^2/b/g^3/( b*x+a)^2-2*B*d*i^2*n*(d*x+c)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/b^2/g^3/(b*x+ a)-1/2*B*i^2*n*(d*x+c)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/b/g^3/(b*x+a)^2-d *i^2*(d*x+c)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/b^2/g^3/(b*x+a)-1/2*i^2*(d* x+c)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/b/g^3/(b*x+a)^2-d^2*i^2*(A+B*ln(e *((b*x+a)/(d*x+c))^n))^2*ln(1-b*(d*x+c)/d/(b*x+a))/b^3/g^3+2*B*d^2*i^2*n*( A+B*ln(e*((b*x+a)/(d*x+c))^n))*polylog(2,b*(d*x+c)/d/(b*x+a))/b^3/g^3+2*B^ 2*d^2*i^2*n^2*polylog(3,b*(d*x+c)/d/(b*x+a))/b^3/g^3
Leaf count is larger than twice the leaf count of optimal. \(3662\) vs. \(2(417)=834\).
Time = 4.48 (sec) , antiderivative size = 3662, normalized size of antiderivative = 8.78 \[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=\text {Result too large to show} \]
(i^2*((-6*(b*c - a*d)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/(c + d*x)])^2)/(a + b*x)^2 + (24*d*(-(b*c) + a*d)*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/(c + d*x)])^2)/(a + b*x) + 12*d^ 2*Log[a + b*x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/( c + d*x)])^2 + (6*b^2*B*c^2*n*(b^2*c^2 - 4*a*b*c*d + a^2*d^2 - 2*b^2*c*d*x - 2*a*b*d^2*x - 2*b^2*d^2*x^2 + 2*d^2*(a + b*x)^2*Log[c/d + x] - 2*d^2*(a + b*x)^2*Log[(d*(a + b*x))/(-(b*c) + a*d)] + 2*b^2*c^2*Log[(a + b*x)/(c + d*x)] - 4*a*b*c*d*Log[(a + b*x)/(c + d*x)] + 2*a^2*d^2*Log[(a + b*x)/(c + d*x)])*(-A - B*Log[e*((a + b*x)/(c + d*x))^n] + B*n*Log[(a + b*x)/(c + d* x)]))/((b*c - a*d)^2*(a + b*x)^2) + (12*b*B*c*d*n*(-A - B*Log[e*((a + b*x) /(c + d*x))^n] + B*n*Log[(a + b*x)/(c + d*x)])*(3*a*b^2*c^2 - 4*a^2*b*c*d + a^3*d^2 + 4*b^3*c^2*x - 6*a*b^2*c*d*x + 2*a^2*b*d^2*x - 2*d*(-2*b*c + a* d)*(a + b*x)^2*Log[a + b*x] + 2*(b*c - a*d)^2*(a + 2*b*x)*Log[(a + b*x)/(c + d*x)] - 4*a^2*b*c*d*Log[c + d*x] + 2*a^3*d^2*Log[c + d*x] - 8*a*b^2*c*d *x*Log[c + d*x] + 4*a^2*b*d^2*x*Log[c + d*x] - 4*b^3*c*d*x^2*Log[c + d*x] + 2*a*b^2*d^2*x^2*Log[c + d*x]))/((b*c - a*d)^2*(a + b*x)^2) + (3*b^2*B^2* c^2*n^2*(-(b*c - a*d)^2 + 6*d*(b*c - a*d)*(a + b*x) + 6*d^2*(a + b*x)^2*Lo g[a + b*x] - 2*d^2*(a + b*x)^2*Log[a + b*x]^2 - 2*(b*c - a*d)^2*Log[(a + b *x)/(c + d*x)] + 4*d*(b*c - a*d)*(a + b*x)*Log[(a + b*x)/(c + d*x)] + 4*d^ 2*(a + b*x)^2*Log[a + b*x]*Log[(a + b*x)/(c + d*x)] - 2*(b*c - a*d)^2*L...
Time = 1.39 (sec) , antiderivative size = 353, normalized size of antiderivative = 0.85, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2961, 2780, 2742, 2741, 2780, 2742, 2741, 2779, 2821, 7143}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(c i+d i x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{(a g+b g x)^3} \, dx\) |
\(\Big \downarrow \) 2961 |
\(\displaystyle \frac {i^2 \int \frac {(c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x)^3 \left (b-\frac {d (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{g^3}\) |
\(\Big \downarrow \) 2780 |
\(\displaystyle \frac {i^2 \left (\frac {\int \frac {(c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x)^3}d\frac {a+b x}{c+d x}}{b}+\frac {d \int \frac {(c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{b}\right )}{g^3}\) |
\(\Big \downarrow \) 2742 |
\(\displaystyle \frac {i^2 \left (\frac {B n \int \frac {(c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a+b x)^3}d\frac {a+b x}{c+d x}-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 (a+b x)^2}}{b}+\frac {d \int \frac {(c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{b}\right )}{g^3}\) |
\(\Big \downarrow \) 2741 |
\(\displaystyle \frac {i^2 \left (\frac {d \int \frac {(c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{b}+\frac {B n \left (-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (a+b x)^2}-\frac {B n (c+d x)^2}{4 (a+b x)^2}\right )-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 (a+b x)^2}}{b}\right )}{g^3}\) |
\(\Big \downarrow \) 2780 |
\(\displaystyle \frac {i^2 \left (\frac {d \left (\frac {\int \frac {(c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x)^2}d\frac {a+b x}{c+d x}}{b}+\frac {d \int \frac {(c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x) \left (b-\frac {d (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{b}\right )}{b}+\frac {B n \left (-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (a+b x)^2}-\frac {B n (c+d x)^2}{4 (a+b x)^2}\right )-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 (a+b x)^2}}{b}\right )}{g^3}\) |
\(\Big \downarrow \) 2742 |
\(\displaystyle \frac {i^2 \left (\frac {d \left (\frac {2 B n \int \frac {(c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a+b x)^2}d\frac {a+b x}{c+d x}-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{a+b x}}{b}+\frac {d \int \frac {(c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x) \left (b-\frac {d (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{b}\right )}{b}+\frac {B n \left (-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (a+b x)^2}-\frac {B n (c+d x)^2}{4 (a+b x)^2}\right )-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 (a+b x)^2}}{b}\right )}{g^3}\) |
\(\Big \downarrow \) 2741 |
\(\displaystyle \frac {i^2 \left (\frac {d \left (\frac {d \int \frac {(c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x) \left (b-\frac {d (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{b}+\frac {2 B n \left (-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-\frac {B n (c+d x)}{a+b x}\right )-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{a+b x}}{b}\right )}{b}+\frac {B n \left (-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (a+b x)^2}-\frac {B n (c+d x)^2}{4 (a+b x)^2}\right )-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 (a+b x)^2}}{b}\right )}{g^3}\) |
\(\Big \downarrow \) 2779 |
\(\displaystyle \frac {i^2 \left (\frac {d \left (\frac {d \left (\frac {2 B n \int \frac {(c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{a+b x}d\frac {a+b x}{c+d x}}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{b}\right )}{b}+\frac {2 B n \left (-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-\frac {B n (c+d x)}{a+b x}\right )-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{a+b x}}{b}\right )}{b}+\frac {B n \left (-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (a+b x)^2}-\frac {B n (c+d x)^2}{4 (a+b x)^2}\right )-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 (a+b x)^2}}{b}\right )}{g^3}\) |
\(\Big \downarrow \) 2821 |
\(\displaystyle \frac {i^2 \left (\frac {d \left (\frac {d \left (\frac {2 B n \left (\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )-B n \int \frac {(c+d x) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{a+b x}d\frac {a+b x}{c+d x}\right )}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{b}\right )}{b}+\frac {2 B n \left (-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-\frac {B n (c+d x)}{a+b x}\right )-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{a+b x}}{b}\right )}{b}+\frac {B n \left (-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (a+b x)^2}-\frac {B n (c+d x)^2}{4 (a+b x)^2}\right )-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 (a+b x)^2}}{b}\right )}{g^3}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {i^2 \left (\frac {d \left (\frac {d \left (\frac {2 B n \left (\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+B n \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )\right )}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{b}\right )}{b}+\frac {2 B n \left (-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-\frac {B n (c+d x)}{a+b x}\right )-\frac {(c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{a+b x}}{b}\right )}{b}+\frac {B n \left (-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (a+b x)^2}-\frac {B n (c+d x)^2}{4 (a+b x)^2}\right )-\frac {(c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 (a+b x)^2}}{b}\right )}{g^3}\) |
(i^2*((-1/2*((c + d*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(a + b* x)^2 + B*n*(-1/4*(B*n*(c + d*x)^2)/(a + b*x)^2 - ((c + d*x)^2*(A + B*Log[e *((a + b*x)/(c + d*x))^n]))/(2*(a + b*x)^2)))/b + (d*((-(((c + d*x)*(A + B *Log[e*((a + b*x)/(c + d*x))^n])^2)/(a + b*x)) + 2*B*n*(-((B*n*(c + d*x))/ (a + b*x)) - ((c + d*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(a + b*x)) )/b + (d*(-(((A + B*Log[e*((a + b*x)/(c + d*x))^n])^2*Log[1 - (b*(c + d*x) )/(d*(a + b*x))])/b) + (2*B*n*((A + B*Log[e*((a + b*x)/(c + d*x))^n])*Poly Log[2, (b*(c + d*x))/(d*(a + b*x))] + B*n*PolyLog[3, (b*(c + d*x))/(d*(a + b*x))]))/b))/b))/b))/g^3
3.2.74.3.1 Defintions of rubi rules used
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^( m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbo l] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^n])^p/(d*(m + 1))), x] - Simp[b*n* (p/(m + 1)) Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b , c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r _.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) , x] + Simp[b*n*(p/(d*r)) Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.))/((d_) + (e_.)* (x_)^(r_.)), x_Symbol] :> Simp[1/d Int[x^m*(a + b*Log[c*x^n])^p, x], x] - Simp[e/d Int[(x^(m + r)*(a + b*Log[c*x^n])^p)/(d + e*x^r), x], x] /; Fre eQ[{a, b, c, d, e, m, n, r}, x] && IGtQ[p, 0] && IGtQ[r, 0] && ILtQ[m, -1]
Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b _.))^(p_.))/(x_), x_Symbol] :> Simp[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c *x^n])^p/m), x] + Simp[b*n*(p/m) Int[PolyLog[2, (-d)*f*x^m]*((a + b*Log[c *x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol ] :> Simp[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q Subst[Int[x^m*((A + B*L og[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; Fre eQ[{a, b, c, d, e, f, g, h, i, A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[ b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
\[\int \frac {\left (d i x +c i \right )^{2} {\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}}{\left (b g x +a g \right )^{3}}d x\]
\[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=\int { \frac {{\left (d i x + c i\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (b g x + a g\right )}^{3}} \,d x } \]
integrate((d*i*x+c*i)^2*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)^3,x , algorithm="fricas")
integral((A^2*d^2*i^2*x^2 + 2*A^2*c*d*i^2*x + A^2*c^2*i^2 + (B^2*d^2*i^2*x ^2 + 2*B^2*c*d*i^2*x + B^2*c^2*i^2)*log(e*((b*x + a)/(d*x + c))^n)^2 + 2*( A*B*d^2*i^2*x^2 + 2*A*B*c*d*i^2*x + A*B*c^2*i^2)*log(e*((b*x + a)/(d*x + c ))^n))/(b^3*g^3*x^3 + 3*a*b^2*g^3*x^2 + 3*a^2*b*g^3*x + a^3*g^3), x)
\[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=\frac {i^{2} \left (\int \frac {A^{2} c^{2}}{a^{3} + 3 a^{2} b x + 3 a b^{2} x^{2} + b^{3} x^{3}}\, dx + \int \frac {A^{2} d^{2} x^{2}}{a^{3} + 3 a^{2} b x + 3 a b^{2} x^{2} + b^{3} x^{3}}\, dx + \int \frac {B^{2} c^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}^{2}}{a^{3} + 3 a^{2} b x + 3 a b^{2} x^{2} + b^{3} x^{3}}\, dx + \int \frac {2 A B c^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{a^{3} + 3 a^{2} b x + 3 a b^{2} x^{2} + b^{3} x^{3}}\, dx + \int \frac {2 A^{2} c d x}{a^{3} + 3 a^{2} b x + 3 a b^{2} x^{2} + b^{3} x^{3}}\, dx + \int \frac {B^{2} d^{2} x^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}^{2}}{a^{3} + 3 a^{2} b x + 3 a b^{2} x^{2} + b^{3} x^{3}}\, dx + \int \frac {2 A B d^{2} x^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{a^{3} + 3 a^{2} b x + 3 a b^{2} x^{2} + b^{3} x^{3}}\, dx + \int \frac {2 B^{2} c d x \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}^{2}}{a^{3} + 3 a^{2} b x + 3 a b^{2} x^{2} + b^{3} x^{3}}\, dx + \int \frac {4 A B c d x \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{a^{3} + 3 a^{2} b x + 3 a b^{2} x^{2} + b^{3} x^{3}}\, dx\right )}{g^{3}} \]
i**2*(Integral(A**2*c**2/(a**3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x**3), x) + Integral(A**2*d**2*x**2/(a**3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x** 3), x) + Integral(B**2*c**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)**2/(a* *3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x**3), x) + Integral(2*A*B*c**2*log (e*(a/(c + d*x) + b*x/(c + d*x))**n)/(a**3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x**3), x) + Integral(2*A**2*c*d*x/(a**3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x**3), x) + Integral(B**2*d**2*x**2*log(e*(a/(c + d*x) + b*x/(c + d *x))**n)**2/(a**3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x**3), x) + Integral (2*A*B*d**2*x**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)/(a**3 + 3*a**2*b* x + 3*a*b**2*x**2 + b**3*x**3), x) + Integral(2*B**2*c*d*x*log(e*(a/(c + d *x) + b*x/(c + d*x))**n)**2/(a**3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x**3 ), x) + Integral(4*A*B*c*d*x*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)/(a**3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x**3), x))/g**3
\[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=\int { \frac {{\left (d i x + c i\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (b g x + a g\right )}^{3}} \,d x } \]
integrate((d*i*x+c*i)^2*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)^3,x , algorithm="maxima")
-A*B*c*d*i^2*n*((3*a*b*c - a^2*d + 2*(2*b^2*c - a*b*d)*x)/((b^5*c - a*b^4* d)*g^3*x^2 + 2*(a*b^4*c - a^2*b^3*d)*g^3*x + (a^2*b^3*c - a^3*b^2*d)*g^3) + 2*(2*b*c*d - a*d^2)*log(b*x + a)/((b^4*c^2 - 2*a*b^3*c*d + a^2*b^2*d^2)* g^3) - 2*(2*b*c*d - a*d^2)*log(d*x + c)/((b^4*c^2 - 2*a*b^3*c*d + a^2*b^2* d^2)*g^3)) + 1/2*A*B*c^2*i^2*n*((2*b*d*x - b*c + 3*a*d)/((b^4*c - a*b^3*d) *g^3*x^2 + 2*(a*b^3*c - a^2*b^2*d)*g^3*x + (a^2*b^2*c - a^3*b*d)*g^3) + 2* d^2*log(b*x + a)/((b^3*c^2 - 2*a*b^2*c*d + a^2*b*d^2)*g^3) - 2*d^2*log(d*x + c)/((b^3*c^2 - 2*a*b^2*c*d + a^2*b*d^2)*g^3)) + 1/2*A^2*d^2*i^2*((4*a*b *x + 3*a^2)/(b^5*g^3*x^2 + 2*a*b^4*g^3*x + a^2*b^3*g^3) + 2*log(b*x + a)/( b^3*g^3)) - 2*(2*b*x + a)*A*B*c*d*i^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^ n)/(b^4*g^3*x^2 + 2*a*b^3*g^3*x + a^2*b^2*g^3) - (2*b*x + a)*A^2*c*d*i^2/( b^4*g^3*x^2 + 2*a*b^3*g^3*x + a^2*b^2*g^3) - A*B*c^2*i^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^n)/(b^3*g^3*x^2 + 2*a*b^2*g^3*x + a^2*b*g^3) - 1/2*A^2* c^2*i^2/(b^3*g^3*x^2 + 2*a*b^2*g^3*x + a^2*b*g^3) - 1/2*(4*(b^2*c*d*i^2 - a*b*d^2*i^2)*B^2*x + (b^2*c^2*i^2 + 2*a*b*c*d*i^2 - 3*a^2*d^2*i^2)*B^2 - 2 *(B^2*b^2*d^2*i^2*x^2 + 2*B^2*a*b*d^2*i^2*x + B^2*a^2*d^2*i^2)*log(b*x + a ))*log((d*x + c)^n)^2/(b^5*g^3*x^2 + 2*a*b^4*g^3*x + a^2*b^3*g^3) - integr ate(-(3*B^2*b^3*c^2*d*i^2*x*log(e)^2 + B^2*b^3*c^3*i^2*log(e)^2 + (B^2*b^3 *d^3*i^2*log(e)^2 + 2*A*B*b^3*d^3*i^2*log(e))*x^3 + (3*B^2*b^3*c*d^2*i^2*l og(e)^2 + 2*A*B*b^3*c*d^2*i^2*log(e))*x^2 + (B^2*b^3*d^3*i^2*x^3 + 3*B^...
\[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=\int { \frac {{\left (d i x + c i\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (b g x + a g\right )}^{3}} \,d x } \]
integrate((d*i*x+c*i)^2*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)^3,x , algorithm="giac")
Timed out. \[ \int \frac {(c i+d i x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=\int \frac {{\left (c\,i+d\,i\,x\right )}^2\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2}{{\left (a\,g+b\,g\,x\right )}^3} \,d x \]